﻿namespace EasyGo.Logic
{
    using EasyGo.Logic.Managers;
    using StructureMap;

    public class LogicConfigurator
    {
        public static void Configure()
        {
            ObjectFactory.Configure(
                ConfigureManagers);
        }

        private static void ConfigureManagers(ConfigurationExpression container)
        {
            container.Scan(
                scan =>
                {
                    scan.AssemblyContainingType<LogicConfigurator>();
                    scan.IncludeNamespaceContainingType<UsersManager>();
                    scan.RegisterConcreteTypesAgainstTheFirstInterface();
                });
        }
    }
}
